package com.example.mqttdemo.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * 传感器数据表
 */
@TableName(value ="sensor_data")
@Data
public class SensorData implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 设备ID
     */
    @TableField(value = "device_id")
    private String deviceId;

    /**
     * 温度值
     */
    @TableField(value = "temperature")
    private BigDecimal temperature;

    /**
     * 湿度值
     */
    @TableField(value = "humidity")
    private BigDecimal humidity;

    /**
     * 单位
     */
    @TableField(value = "unit")
    private String unit;

    /**
     * 数据时间戳
     */
    @TableField(value = "timestamp")
    private LocalDateTime timestamp;

    /**
     * 数据质量
     */
    @TableField(value = "data_quality")
    private String dataQuality;

    /**
     * 0未删 1已删
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}